<?php




while (true) {
    $redis = new Redis();
    $redis->connect('127.0.0.1');
	$id = $redis->blPop('work',10);
	$id = empty($id)?'':$id[1];
	if($id)
    {
            //白天8-19
            $h = date('H');
            $minute = date('i');
            $h = $h+$minute/60;

            $bidDay ='_n';
            if($h >=0 && $h< 18.75)
            {
                $bidDay ='_d';
            }


            $arrbus = explode('-', $id);
            $arrbus = array_unique($arrbus);

            $res = $redis->select(6);              //使用6号库
            $daytime = date('Ymd');

            foreach ($arrbus as $key => $bid)
            {
                $check = $redis->get('wdyjishu:'.'_register:'.$daytime.$bidDay.':'.$bid);
                if (!$check) {
                    $redis->set('wdyjishu:'.'_register:'.$daytime.$bidDay.':'.$bid,0,86400*7);
                }
                $redis->incr('wdyjishu:'.'_register:'.$daytime.$bidDay.':'.$bid);
            }
    }
}